]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Hardcode osd bg color
authorJakub Steiner <jimmac@gmail.com>
Tue, 31 May 2022 06:45:26 +0000 (08:45 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 3 Jun 2022 15:41:04 +0000 (15:41 +0000)
- osd needs to work for both light & dark contexts

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5537

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2315>

data/theme/gnome-shell-sass/_colors.scss
data/theme/gnome-shell-sass/_common.scss
data/theme/gnome-shell-sass/widgets/_screenshot.scss

index 73db6fe03f563cda0b0a9f4d821d126e4d9f3759..7e7aaabe3aee44dd0158ba8b33833fa7c6fb48e9 100644 (file)
@@ -48,8 +48,9 @@ $dark_3: #3d3846;
 $dark_4: #241f31;
 $dark_5: #000000;
 
+$_dark_base_color: darken(desaturate(#241f31, 100%), 2%);
 
-$base_color: if($variant == 'light', #fff, darken(desaturate(#241f31, 100%), 2%));
+$base_color: if($variant == 'light', #fff, $_dark_base_color);
 $bg_color: if($variant == 'light', #f6f5f4, lighten($base_color, 5%));
 $fg_color: if($variant == 'light', transparentize(black, .2), white);
 
@@ -69,7 +70,7 @@ $success_color: if($variant == 'light', $green_4, $green_5);
 $destructive_color: $error_color;
 
 $osd_fg_color: white;
-$osd_bg_color: transparentize(desaturate($bg_color, 100%),0.04);
+$osd_bg_color: $_dark_base_color; //hardcoded for both light & dark
 $osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
 $osd_insensitive_fg_color: if($variant == 'light', mix($osd_fg_color, $osd_bg_color, 80%),  mix($osd_fg_color, $osd_bg_color, 70%));
 $osd_borders_color: transparentize(black, 0.3);
index c6e64766efafc07288a92ed20e389533d4cadf78..dbbf79e01fdad46d059a15f4ae93c13c487642f0 100644 (file)
@@ -163,11 +163,11 @@ $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($
 // that are undecorated by default and use OSD colors
 %osd_button {
   @include button(undecorated);
-  &:insensitive { @include button(undecorated, $c:$osd_bg_color);}
-  &:focus { @include button(focus, $c:$osd_bg_color);}
-  &:hover { @include button(hover, $c:$osd_bg_color);}
-  &:active { @include button(active, $c:$osd_bg_color);}
-  &:outlined,&:checked { @include button(checked, $c:$osd_bg_color);}
+  &:insensitive { @include button(undecorated, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  &:focus { @include button(focus, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  &:hover { @include button(hover, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  &:active { @include button(active, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  &:outlined,&:checked { @include button(checked, $tc:$osd_fg_color, $c:$osd_bg_color);}
 }
 
 /* General Typography */
index c0a983df9bd238b8bdfe0550dab4b86dedda7fa6..7b6747c8b80200f04b583a9552ed59b4826def6d 100644 (file)
@@ -81,7 +81,7 @@ $screenshot_ui_button_red: $error_color;
 }
 
 .screenshot-ui-shot-cast-container {
-  background-color: $hover_bg_color;
+  background-color: lighten($osd_bg_color,5%);
   border-radius: $modal_radius;
   padding: $screenshot_ui_shot_cast_spacing;
   spacing: $screenshot_ui_shot_cast_spacing;
@@ -93,7 +93,7 @@ $screenshot_ui_button_red: $error_color;
 .screenshot-ui-shot-cast-button {
   padding: $base_padding $base_padding*2;
   background-color: transparent;
-  &:hover, &:focus { background-color: lighten($hover_bg_color, 5%);}
+  &:hover, &:focus { background-color: lighten($osd_bg_color, 10%);}
   &:active { background-color: lighten($active_bg_color,5%);}
   &:checked { background-color: white;color: black;}